<div class="row">
  <div class="col-xs-12">

    <%= render partial: 'common/nav', locals: {show_tab: :index, model_nav_name: :admin_process_define, pjax: true} %>

    <%= form_for 'ProcessDefine', url: admin_process_defines_destroy_multi_path, method: :post do %>
        <button class="btn btn-minier btn-danger" type="submit">
          <i class="icon-trash"></i> <%= t 'common.delete_multi' %></button>
        <div id="admin_process_defines">
          <%= grid(@process_defines, show_filters: :when_filtered) do |g|
            g.action_column param_name: :select_ids, object_property: :id
            g.column name: "#{t 'activerecord.attributes.defaults.id'}", attribute: 'id', filter: false, ordering: true


            g.column name: "#{t 'activerecord.attributes.process_define.bpmn_id'}", attribute: 'bpmn_id'


            g.column name: "#{t 'activerecord.attributes.process_define.bpmn_key'}", attribute: 'bpmn_key'


            g.column name: "#{t 'activerecord.attributes.process_define.current_version_code'}", attribute: 'current_version_code'


            g.column do |c|
              grid_operator(:admin_process_define_path, c.id)
              link_to '创建实例',  "/admin/process_defines/#{c.id}/create_instance"
            end
          end %>
        </div>

    <% end %>
  </div>
</div>

<script>
    $(function () {
        $('.nav.nav-list li.active').removeClass('active');
        $('.nav.nav-list li[data-model="process_define_list"]').addClass('active');
    });
</script>